<script lang="ts" setup>
import XCaptcha from '@/components/Form/XCaptcha.vue'
import Layout from '@/components/Form/Layout.vue'
import XInput from '@/components/Form/XInput.vue'
import XButton from '@/components/Form/XButton.vue'
import XGraphicCaptcha from '@/components/Form/XGraphicCaptcha.vue'
import navigateTo from '@/utils/navigator'

const {formData} = $(useForgetStore())

// 跳转设置密码
function next() {
    navigateTo('/pages/forget/next')
}

</script>

<template>
    <Layout v-model="formData.accept" :show-wechat="false">
        <!-- 账号 -->
        <view>
            <XInput v-model="formData.account" placeholder="请输入手机号"/>
        </view>
        <!-- 图形验证码 -->
        <view mt-5>
            <XGraphicCaptcha v-model="formData.graphicCaptcha" type="change"/>
        </view>
        <!-- 短信验证码 -->
        <view m="t-5 b-6.25">
            <XCaptcha v-model:send="formData.send" v-model="formData.code" type="change" :form-data="formData"/>
        </view>
        <XButton :form-data="formData" @click="next">
            下一步
        </XButton>
    </Layout>
</template>
